import React, { useState } from 'react';
import LoginView from './login/LoginView';
import HOCcomponent from './HOC/HOCcomponent';
import HomeView from './home/HomeView'
// 调用高阶函数（高阶组件）, 
// 高阶组件，组件内调用，
const NewComponent = HOCcomponent(LoginView, HomeView)
const App = () => {
  const [isLogin, setLoginState] = useState(false)

  return (
    // <LoginView></LoginView>
    <NewComponent isLogin={isLogin}></NewComponent>
  );
}

export default App;
